﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<iBuproModel.Department>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Detail
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%:Html.Translate("department") %> <%:Model.Name %></h2>

    <fieldset>       
        <div class="display-label"><%:Html.Translate("name") %></div>
        <div class="display-field"><%: Model.Name %></div>

        <div class="display-label"><%:Html.Translate("shortcut") %></div>
        <div class="display-field"><%: Model.Shortcut %></div>
        
        <div class="display-label"><%:Html.Translate("visibility") %></div>
        <div class="display-field"><%: Model.Visible %></div>

        <div class="display-label"><%:Html.Translate("principal") %></div>
        <div class="display-field">
        <% foreach (var principal in Model.DepartmentPrincipal)
            { %>
            <%: Html.ActionLink(principal.Username, "Details", "User", new { id = principal.Id }, null)%>
        <% } %>
        </div>
        
    </fieldset>
    <p>

        <%: Html.ActionLink(Html.Translate("edit"), "Edit", new { id=Model.Id }) %>
    </p>

</asp:Content>

